package com.io.reader1;
import java.io.FileWriter;
import java.io.IOException;
public class Test7 {

	public static void main(String[] args) throws IOException   {


		String str = "Hello World";
		FileWriter fw=null;
		//1
		try {
			fw = new FileWriter("D:\\ѧϰ\\demotext.txt");
			//2s
			fw. write(str) ;
			//3
			fw.close();
		} catch (IOException e) {
			//4
			e. printStackTrace() ;
		}

		
		
	}

}
